﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="team_view.aspx.cs" Inherits="UserControls_team_view" %>

<%@ Register src="~/UserControls/CFooterControl.ascx" tagname="CFooterControl" tagprefix="uc1" %>
<%@ Register src="~/UserControls/CHeaderControl.ascx" tagname="CHeaderControl" tagprefix="uc2" %>
<%@ Register src="blockothers.ascx" tagname="blockothers" tagprefix="uc4" %>
<%@ Register src="blockinvite.ascx" tagname="blockinvite" tagprefix="uc5" %>
<%@ Register src="blockflv.ascx" tagname="blockflv" tagprefix="uc6" %>
<%@ Register src="blockask.ascx" tagname="blockask" tagprefix="uc7" %>
<%@ Register src="blockvote.ascx" tagname="blockvote" tagprefix="uc8" %>
<%@ Register src="blockbusiness.ascx" tagname="blockbusiness" tagprefix="uc9" %>
<%@ Register src="blocksubscribe.ascx" tagname="blocksubscribe" tagprefix="uc10" %>
<%@ Register src="blockbulletin.ascx" tagname="blockbulletin" tagprefix="uc11" %>
<%@ Register src="blockshare.ascx" tagname="blockshare" tagprefix="uc3" %>
<%@ Register src="uc_Location.ascx" tagname="uc_Location" tagprefix="uc12" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>标题</title>
</head>  
<body>
<form id="form1" runat="server">
<div id="pagemasker"></div><div id="dialog"></div>
<div id="doc">



<uc2:CHeaderControl ID="CHeaderControl1" runat="server" />



<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div class="midad">
 <uc12:uc_Location ID="uc_Location1" runat="server"  Location="1"/>
 </div>


<%if(over){ %>
<div id="sysmsg-tip" class="sysmsg-tip-deal-close"><div class="sysmsg-tip-top"></div><div class="sysmsg-tip-content"><div class="deal-close"><div class="focus">抱歉，您来晚了，<br />团购已经结束啦。</div><div id="tip-deal-subscribe-body" class="body"><table><tr><td>不想错过明天的团购？立刻订阅每日最新团购信息：&nbsp;</td><td><input type="text" name="sub_email" class="f-text" value="" group="a" require="true" datatype="email" /></td><td>&nbsp;<input  group="a" type="submit" class="validator commit" value="订阅" action="/subscribe.aspx" /></td></tr></table></div></div><span id="sysmsg-tip-close" class="sysmsg-tip-close">关闭</span></div><div class="sysmsg-tip-bottom"></div></div>
<%} %>

<%if (order.Count > 0)
                    { %>
<div id="sysmsg-tip" >
<div class="sysmsg-tip-top"></div>
<div class="sysmsg-tip-content">您已经下过订单，但还没有付款。<a href="/order/check.aspx?orderid=<%=order["id"] %>">查看订单并付款</a>
<span id="sysmsg-tip-close" class="sysmsg-tip-close">关闭</span></div>
<div class="sysmsg-tip-bottom"></div></div>

<div id="deal-default"> 
<%} %>

	<div id="deal-default">
<uc3:blockshare ID="blockshare1" runat="server" />
       


		<div id="content">
			<div id="deal-intro" class="cf">
                <h1><%if (!over)
                                                        { %>
                                                        <a class="deal-today-link" href="../team.aspx?id=<%=team["id"] %>"><%=strtitle %>：</a><%} %><%=team["title"] %></h1>
                <div class="main">
                    <div class="deal-buy">
                        <div class="deal-price-tag"></div>
					<%if (state==TeamState.successnobuy){ %>
                        <p class="deal-price"><strong><%=ASSystemArr["currency"] %><%=GetMoney(team["team_price"]) %></strong><span class="deal-price-over"></span></p>
					<%}else if(over){ %>

                        <p class="deal-price"><strong><%=ASSystemArr["Currency"] %><%=GetMoney(team["team_price"]) %></strong><span class="deal-price-end"></span></p>
<%}
       else
       {%> 
                        <p class="deal-price"><strong><%=ASSystemArr["Currency"]%><%=GetMoney(team["team_price"])%></strong>
                        
                        
                       
                  
                 <%--  <span class="deal-price-expire">--%>

                   <%if (CurrentTeam.Begin_time <= DateTime.Now)
                     {
                      
                          %>   
                          
            <%--     <a href="<%=buyurl %>"> <img src="<%=ImagePath() %>button-deal-buy.gif" /></a></span></p>--%>
                 <a href="<%=buyurl %>"><span class="deal-price-buy"></span></a>
             <% }
                     else{%>
                     <a href="#"><span class="deal-price-notstart"></span></a>
             <% }%>
    <%--         </span>--%>
             
             </p>
                <% } %>
                    </div>
                    <table class="deal-discount">
                        <tr>
                            <th>原价</th>
                            <th>折扣</th>
                            <th>节省</th>
                        </tr>
                        <tr>

                            <td><%=ASSystemArr["Currency"] %><%=GetMoney(team["Market_price"])%></td>

							<td><%=Utils.WebSiteHelper.GetDiscount(Utils.Helper.GetDecimal(team["Market_price"],0),Utils.Helper.GetDecimal(team["Team_price"],0)) %></td>
                            <td><%=ASSystemArr["Currency"] %><%=GetMoney((Utils.Helper.GetDecimal(team["Market_price"], 0) - Utils.Helper.GetDecimal(team["Team_price"], 0)).ToString())%></td>
                        </tr>
                    </table>
					<%if(over){ %>
                    <div class="deal-box deal-timeleft deal-off" id="deal-timeleft" curtime="<%=curtimefix %>" diff="<%=difftimefix %>">
						<h3>本团购结束于</h3>
						<div class="limitdate"><p class="deal-buy-ended"><%=overtime.ToString("yyyy-MM-dd HH:mm:ss")%><br/></p></div>
					</div>
					<%}else{ %>
                    <div class="deal-box deal-timeleft deal-on" id="deal-timeleft" curtime="<%=curtimefix %>" diff="<%=difftimefix %>">
						<h3>剩余时间</h3>
						<div class="limitdate"><ul id="counter">
						<%if((CurrentTeam.End_time-DateTime.Now).Days>0){ %>
							<li><span><%=(CurrentTeam.End_time-DateTime.Now).Days %></span>天</li><li><span><%=(CurrentTeam.End_time-DateTime.Now).Hours %></span>小时</li><li><span><%=(CurrentTeam.End_time-DateTime.Now).Minutes %></span>分钟</li>
						<%}else{ %>
							<li><span><%=(CurrentTeam.End_time-DateTime.Now).Hours %></span>小时</li><li><span><%=(CurrentTeam.End_time-DateTime.Now).Minutes %></span>分钟</li><li><span><%=(CurrentTeam.End_time-DateTime.Now).Seconds %></span>秒</li>
						<%} %>
						</ul></div>
					</div>
					<%} %>

				<%if(!over){ %>

					<%if(state==TeamState.begin){ %>


					<div class="deal-box deal-status" id="deal-status">
						<p class="deal-buy-tip-top"><strong><%=team["Now_number"]%></strong> 人已购买</p>
						<div class="progress-pointer" style="padding-left:<%=(size-offset)%>px;"><span></span></div>
						<div class="progress-bar"><div class="progress-left" style="width:<%=(size-offset)%>px;"></div><div class="progress-right "></div></div>
						<div class="cf"><div class="min">0</div><div class="max"><%=team["Min_number"] %></div></div>
                        <%if(CurrentTeam.Max_number>0){ %>
						<p class="deal-buy-tip-btm">还差 <strong><%= (CurrentTeam.Min_number-CurrentTeam.Now_number) %></strong> 人到达最低团购人数</p>
                        <%} %>
					</div>
				<%}else if(state==TeamState.successbuy){ %>
					<div class="deal-box deal-status deal-status-open" id="deal-status">
						<p class="deal-buy-tip-top"><strong><%=CurrentTeam.Now_number %></strong> 人已购买</p>
					<%if(CurrentTeam.Max_number>0&&CurrentTeam.Max_number>CurrentTeam.Now_number){ %>
               
						<p class="deal-buy-tip-btm">本单仅剩：<strong><%=CurrentTeam.Max_number-CurrentTeam.Now_number %></strong>份，欲购从速</p>
					<%} %>

                    <%if (CurrentTeam.Now_number >= CurrentTeam.Min_number)
                      { %>
						<p class="deal-buy-on" style="line-height:200%;"><img src="<%=ImagePath() %>deal-buy-succ.gif"/> 团购成功！
                        <% }%>
                        
                        
                         <%if((CurrentTeam.Max_number==0)||(CurrentTeam.Max_number-CurrentTeam.Now_number)>0){ %><br/>还可以继续购买<%} %></p>
					<%if(CurrentTeam.Reach_time.HasValue && CurrentTeam.Reach_time<=System.DateTime.Now){ %>
						<p class="deal-buy-tip-btm"><%=CurrentTeam.Reach_time.Value.ToString("MM-dd HH:mm") %>达到最低团购人数：<strong><%=CurrentTeam.Min_number %></strong>人</p>
					<%} %>
					</div>
					<%} %>
				<%}else{ %>

					<div class="deal-box deal-status deal-status-<%=teamstatestring %>" id="deal-status"><div class="deal-buy-<%=teamstatestring %>"></div><p class="deal-buy-tip-total">共有 <strong><%=team["Now_number"] %></strong> 人购买</p></div> 
				<%} %>
				</div>
                <div class="side">
                    <div class="deal-buy-cover-img" id="team_images">
					<%if(team["image1"]!=String.Empty||team["image2"]!=String.Empty){ %>
						<div class="mid">
							<ul>
								<li class="first"><img src="<%=team["image"] %>"/></li>
							<%if(team["image1"]!=String.Empty){ %>
								<li><img src="<%=team["image1"] %>"/></li>
							<%} %>
							<%if(team["image2"]!=String.Empty){ %>
								<li><img src="<%=team["image2"] %>"/></li>
							<%} %>
							</ul>
							<div id="img_list">
								<a ref="1" class="active">1</a>
							
							<%if(team["image1"]!=String.Empty){ %>
								<a ref="<%=imageindex %>" ><%=imageindex %></a>

							<%imageindex=imageindex+1;} %>
							<%if(team["image2"]!=String.Empty){ %>
								<a ref="<%=imageindex %>" ><%=imageindex%></a>
							<%} %>
							</div> 
						</div>
  
						<%}else{ 
						    %>
							<img src="<%=team["image"] %>" width="440" height="280" />
						<%} %>
					</div>
                    <div class="digest"><br /><%=team["Summary"] %></div>
                </div>
            </div>


           <%if (_system != null)
                              { %>
                            <%
                                if (_system["shanhu"] == "0")
                                { %>
                            <!--老模式开始-->
                            <div id="deal-stuff" class="cf">
                                <div class="clear box <%if(team["Partner_id"]!="0"&&ASSystemArr["teamwhole"]=="Y"){ %> box-split <%} %>">
                                    <div class="box-content cf">
                                        <div class="main" id="team_main_side">
                                            <%if (team["detail"] != String.Empty)
                                              { %>
                                            <h2 id="H1">
                                                <img src="<%=ImagePath() %>bdxq.jpg" alt="本单详情" /></h2>
                                            <div class="blk detail" zoom_img_width="418">
                                                <%=team["detail"]%></div>
                                            <%} %>
                                            <%if (!String.IsNullOrEmpty(team["notice"]))
                                              { %>
                                            <h2 id="H2">
                                                <img src="<%=ImagePath() %>tbts.jpg" alt="特别提示" /></h2>
                                            <div class="blk cf" zoom_img_width="418">
                                                <%=team["notice"]%></div>
                                            <%} %>
                                            <%if (!String.IsNullOrEmpty(team["userreview"]))
                                              { %>
                                            <h2 id="H3">
                                                <img src="<%=ImagePath() %>tms.jpg" alt="他们说" /></h2>
                                            <div class="blk review" zoom_img_width="418">
                                                <%=Utils.WebSiteHelper.GetSpilt(team["userreview"])%>
                                             
                                            </div>
                                            <%} %>
                                            <%if (!String.IsNullOrEmpty(team["systemreview"]))
                                              { %>
                                            <h2 id="H4">
                                                <%=ASSystemArr["abbreviation"]%>说</h2>
                                            <div class="blk review" zoom_img_width="418">
                                                <%=team["systemreview"]%></div>
                                            <%} %>
                                        </div>
                                        <div class="side" id="team_partner_side_<%=twoline %>">
                                            <div id="side-business">
                                                <h2>
                                                    <%=partner["title"]%></h2>
                                                <div style="margin-top: 10px;">
                                                    <%=partner["Phone"]%></div>
                                                <div style="margin-top: 10px;">
                                                    <%=partner["Address"]%></div>
                                                <div style="margin-top: 10px;">
                                                    <%=partner["location"]%></div>
                                                <%if (partner["homepage"] != null)
                                                  { %><div style="margin-top: 10px;">
                                                      <a href="http://<%=partner["homepage"] %>" target="_blank">
                                                          <%=partner["homepage"].Replace("http://", "")%></a>
                                                  </div>
                                                <%} %>
                                            </div>
                                        </div>
                                        <div class="clear">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--老模式结束-->
                            <% }
                                else
                                {%>
                            <!--修改代码开始-->
                            <div id="deal-stuff1" class="cf1">
                                <div class="clear box ">
                                    <div class="box-content1 cf1">
                                        <div class="slider-wrap">
                                            <div class="xxk" zoom_img_width="640">
                                                <div id="page-wrap">
                                                    <div id="organic-tabs">
                                                        <ul class="xuanxiangk" id="explore-nav">
                                                            <li class="xuanxiangk" id="ex-featured"><a rel="featured" href="#" class="current">本单详情</a></li>
                                                            <li class="xuanxiangk" id="Li2"><a rel="core" href="#">项目答疑</a></li>
                                                            <%if (ASSystem.teamwhole == 1 && part != null)
                                                              { %>
                                                            <li class="xuanxiangk" id="ex-core"><a rel="jquerytuts" href="#">商户信息</a></li>
                                                            <%} %>
                                                         
                                                        </ul>
                                                        <div id="all-list-wrap">
                                                           
                                                            <ul class="xuanxiangk" id="featured">
                                                                <%if (team["detail"] != String.Empty)
                                                                  { %>
                                                                <h2 id="detail">
                                                                    <img src="<%=ImagePath() %>bdxq.jpg" alt="本单详情" /></h2>
                                                                <div>
                                                                    <%=team["detail"]%>
                                                                </div>
                                                                <% }%>
                                                                <!--提示-->
                                                                <%if (!String.IsNullOrEmpty(team["notice"]))
                                                                  { %>
                                                                <h2 id="detailit">
                                                                    <img alt="特别提示" src="<%=ImagePath() %>tbts.jpg" /></h2>
                                                                <div>
                                                                    <%=team["notice"]%>
                                                                </div>
                                                                <% }%>
                                                                <%if (!String.IsNullOrEmpty(team["userreview"]))
                                                                  { %>
                                                                <h2 id="userreview">
                                                                    <img src="<%=ImagePath() %>tms.jpg" alt="他们说" /></h2>
                                                                <div class="blk review">
                                                                    <%=Utils.WebSiteHelper.GetSpilt(team["userreview"])%>
                                                                </div>
                                                                <%} %>
                                                                <%if (!String.IsNullOrEmpty(team["systemreview"]))
                                                                  { %>
                                                                <h2 id="systemreview">
                                                                    <%=ASSystemArr["abbreviation"]%>说</h2>
                                                                <div>
                                                                    <div>
                                                                        <%=team["systemreview"]%>
                                                                    </div>
                                                                </div>
                                                                <% }%>
                                                            </ul>
                                                            <ul class="xuanxiangk" id="core">
                                                                <div id="consult">
                                                                    <h3>
                                                                    </h3>
                                                                    <div class="sect consult-list">
                                                                        <ul class="list">
                                                                            <%= ListAsk()%>
                                                                        </ul>
                                                                    </div>
                                                                </div>
                                                            </ul>
                                                            <%if (ASSystem.teamwhole == 1 && part != null)
                                                              { %>
                                                            <ul class="xuanxiangk" id="jquerytuts">
                                                                <h2>
                                                                    <%=partner["title"]%></h2>
                                                                <div style="margin-top: 10px;">
                                                                    联系人:<%=partner["Contact"]%></div>
                                                                <div style="margin-top: 10px;">
                                                                    联系电话:<%=partner["Phone"]%></div>
                                                                <div style="margin-top: 10px;">
                                                                    商户地址:<%=partner["Address"]%></div>
                                                                <div style="margin-top: 10px;">
                                                                    手机号码:<%=partner["Mobile"]%></div>
                                                                <div style="margin-top: 10px;">
                                                                    位置信息:<%=partner["location"]%></div>
                                                                <div style="margin-top: 10px;">
                                                                    其它信息:<%=partner["Other"]%></div>
                                                                <%if (partner["homepage"] != null)
                                                                  { %><div style="margin-top: 10px;">
                                                                      <a href="http://<%=partner["homepage"] %>" target="_blank">
                                                                          <%=partner["homepage"].Replace("http://", "")%></a>
                                                                  </div>
                                                                <%} %>
                                                                <% if (partner["Image"] != "")
                                                                   { %>
                                                                <div style="margin-top: 10px;">
                                                                    <img alt="" src="<%=partner["Image"] %>" /></div>
                                                                <%} %>
                                                                <% if (partner["Image1"] != "")
                                                                   { %>
                                                                <div style="margin-top: 10px;">
                                                                    <img alt="" src="<%=partner["Image1"] %>" /></div>
                                                                <%} %>
                                                                <% if (partner["Image2"] != "")
                                                                   { %>
                                                                <div style="margin-top: 10px;">
                                                                    <img alt="" src="<%=partner["Image2"] %>" /></div>
                                                                <%} %>
                                                            </ul>
                                                            <% }%>
                                                        </div>
                                                        <!-- END List Wrap -->
                                                    </div>
                                                    <!-- END Organic Tabs -->
                                                </div>
                                                <!-- #slider1 -->
                                            </div>
                                        </div>
                                        <div class="clear">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--修改代码结束-->
                            <% }%>
                            <%}
                              else
                              { %>
                            <!--修改代码开始-->
                            <div id="deal-stuff" class="cf1">
                                <div class="clear box ">
                                    <div class="box-content1 cf1">
                                        <div class="slider-wrap">
                                            <div class="xxk" zoom_img_width="640">
                                                <div id="Div2">
                                                    <div id="Div3">
                                                        <ul class="xuanxiangk" id="Ul1">
                                                            <li class="xuanxiangk" id="Li1"><a rel="featured" href="#" class="current">本单详情</a></li>
                                                             <li class="xuanxiangk" id="Li4"><a rel="core" href="#">项目答疑</a></li>
                                                            <%if (ASSystem.teamwhole == 1 && part != null)
                                                              { %>
                                                            <li class="xuanxiangk" id="Li3"><a rel="jquerytuts" href="#">商户信息</a></li>
                                                            <%} %>
                                                        </ul>
                                                        <div id="Div4">
                                                            <ul class="xuanxiangk" id="Ul2">
                                                                <%if (team["detail"] != String.Empty)
                                                                  { %>
                                                                <h2 id="H5">
                                                                    <img src="<%=ImagePath() %>bdxq.jpg" alt="本单详情" /></h2>
                                                                <div>
                                                                    <%=team["detail"]%>
                                                                </div>
                                                                <% }%>
                                                                <!--提示-->
                                                                <%if (!String.IsNullOrEmpty(team["notice"]))
                                                                  { %>
                                                                <h2 id="H6">
                                                                    <img alt="特别提示" src="<%=ImagePath() %>tbts.jpg" /></h2>
                                                                <div>
                                                                    <%=team["notice"]%>
                                                                </div>
                                                                <% }%>
                                                                <%if (!String.IsNullOrEmpty(team["userreview"]))
                                                                  { %>
                                                                <h2 id="H7">
                                                                    <img src="<%=ImagePath() %>tms.jpg" alt="他们说" /></h2>
                                                                <div class="blk review">
                                                                    <%=Utils.WebSiteHelper.GetSpilt(team["userreview"])%>
                                                                </div>
                                                                <%} %>
                                                                <%if (!String.IsNullOrEmpty(team["systemreview"]))
                                                                  { %>
                                                                <h2 id="H8">
                                                                    <%=ASSystemArr["abbreviation"]%>说</h2>
                                                                <div>
                                                                    <div>
                                                                        <%=team["systemreview"]%>
                                                                    </div>
                                                                </div>
                                                                <% }%>
                                                            </ul>
                                                            <ul class="xuanxiangk" id="Ul3">
                                                                <div id="Div5">
                                                                    <h3>
                                                                    </h3>
                                                                    <div class="sect consult-list">
                                                                        <ul class="list">
                                                                            <%= ListAsk()%>
                                                                        </ul>
                                                                    </div>
                                                                </div>
                                                            </ul>
                                                            <%if (ASSystem.teamwhole == 1 && part != null)
                                                              { %>
                                                            <ul class="xuanxiangk" id="Ul4">
                                                                <h2>
                                                                    <%=partner["title"]%></h2>
                                                                <div style="margin-top: 10px;">
                                                                    联系人:<%=partner["Contact"]%></div>
                                                                <div style="margin-top: 10px;">
                                                                    联系电话:<%=partner["Phone"]%></div>
                                                                <div style="margin-top: 10px;">
                                                                    商户地址:<%=partner["Address"]%></div>
                                                                <div style="margin-top: 10px;">
                                                                    手机号码:<%=partner["Mobile"]%></div>
                                                                <div style="margin-top: 10px;">
                                                                    位置信息:<%=partner["location"]%></div>
                                                                <div style="margin-top: 10px;">
                                                                    其它信息:<%=partner["Other"]%></div>
                                                                <%if (partner["homepage"] != null || partner["homepage"].ToString() == "")
                                                                  { %><div style="margin-top: 10px;">
                                                                      <a href="http://<%=partner["homepage"] %>" target="_blank">
                                                                          <%=partner["homepage"].Replace("http://", "")%></a>
                                                                  </div>
                                                                <%} %>
                                                                <% if (partner["Image"] != "")
                                                                   { %>
                                                                <div style="margin-top: 10px;">
                                                                    <img alt="" src="<%=partner["Image"] %>" /></div>
                                                                <%} %>
                                                                <% if (partner["Image1"] != "")
                                                                   { %>
                                                                <div style="margin-top: 10px;">
                                                                    <img alt="" src="<%=partner["Image1"] %>" /></div>
                                                                <%} %>
                                                                <% if (partner["Image2"] != "")
                                                                   { %>
                                                                <div style="margin-top: 10px;">
                                                                    <img alt="" src="<%=partner["Image2"] %>" /></div>
                                                                <%} %>
                                                            </ul>
                                                            <% }%>
                                                        </div>
                                                        <!-- END List Wrap -->
                                                    </div>
                                                    <!-- END Organic Tabs -->
                                                </div>
                                                <!-- #slider1 -->
                                            </div>
                                        </div>
                                        <div class="clear">
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <!--修改代码结束-->
                            <% }%>
                        </div>
                    </div>
    <div id="sidebar">


                        <%=Maticsoft.BLL.Location.Getimg() %>
<uc4:blockothers ID="blockothers1" runat="server" />

<uc5:blockinvite ID="blockinvite1" runat="server" />
     

<uc11:blockbulletin ID="blockbulletin1" runat="server" />


<uc6:blockflv ID="blockflv1" runat="server" />

<uc7:blockask ID="blockask1" runat="server" />



<uc8:blockvote ID="blockvote1" runat="server" />


<uc9:blockbusiness ID="blockbusiness1" runat="server" />
    

<uc10:blocksubscribe ID="blocksubscribe1" runat="server" />
 
</div>
</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->
<uc1:CFooterControl ID="CFooterControl1" runat="server" />
</div>
</form>

</body>
</html>